package com.iims.market.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.iims.common.core.domain.BaseEntity;
import com.iims.common.core.domain.HttpParamMap;
import com.iims.common.core.domain.entity.SysMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 合同和项目类别共用
 *
 * @TableName cmis_contract_type
 */
@ApiModel("合同类型")
@Data
@TableName(value = "cmis_contract_type")
public class ContractType extends BaseEntity {

    @ApiModelProperty(value = "合同类型Id", required = true)
    @TableId(type = IdType.AUTO)
    private Integer ctraTypeId;

    @ApiModelProperty(value = "合同类型名称", required = true)
    private String ctraTypeName;

    @ApiModelProperty(value = "父Id", required = true)
    private Integer parentId;

    /**
     * 祖级列表
     */
    @ApiModelProperty(hidden = true)
    private String ancestors;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @ApiModelProperty(hidden = true)
    @JsonIgnore
    @TableLogic(value = "0", delval = "2")
    private String delFlag;

    /**
     * 子类型
     */
    @ApiModelProperty(hidden = true)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private List<ContractType> children;

}